package com.simtop.car.mapper;

import com.simtop.car.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserMapper {
    User login(User user);

    List<Role> getRole();

    int register(User user);

    User checkEmail(@Param("email") String email);

    int updatePassword(User user);

    void submitGrades(Grade grade);

    void expertLogin(User expertLoginUser);

    int submitComments(Grade grade);

    List<GradeNums> getNums(@Param("uId") Integer uId,@Param("brandType") String[] brandType,String uuid);

    Integer countNums(@Param("table") String table, @Param("brandType") String[] brandType);

    List<Grade> getGrade(User user);

    List<ConformityMapping> getConformityName(@Param("word") String[] word);

    Integer getUserNums();

    Integer getExperimentNums();

    Echarts3 selectScoreUser();

    List<Echarts2> selectRoleUser();

    List<LoyaltyIndex> getLoyaltyIndex(@Param("uId") Integer uId, @Param("brandType") String[] brandType,@Param("uuid") String uuid);

    List<LoyaltyIndex> getYield(@Param("brandType") String[] brandType);

    int addExperiment(List<Experiment> experiment);

    int addQuarter(Quarter quarter);

    List<Experiment> getExperiment(Experiment experiment);

   Quarter getQuarter(Quarter quarter);

    List<User> searchUser(@Param("username") String username);

    int deleteUser(@Param("id") Integer id);

    List<Experiment> getExperimentSum(@Param("id") Integer id,@Param("brandType") String brandType);

    List<WeChat> getWechat(@Param("brandType")String[] brandType);

    List<News> getNews(@Param("brandType")String[] brandType);

    List<String> getWeiBo(@Param("brandType")String brandType);

    List<String> getCommunityForum(@Param("brandType")String brandType);

    List<CompanyWebsite> getCompanyWebsite(@Param("brandType")String[] brandType);

    List<Patent> getPatent(@Param("brandType")String[] brandType);

    List<CorporateAnnualReports> getCorporateAnnualReports(@Param("brandType") String[] brandType);

    List<Experiment> getScaleGrade(@Param("uId") Integer id);

    int commitScaleGrade(@Param("gradeId") Integer gradeId, @Param("scaleScore") Integer scaleScore,@Param("simulation") String simulation,@Param("aggregateAmount") Integer aggregateAmount);

    Integer getBrandTypeNums(@Param("brandType") String brandType,@Param("source") String source);

    List<Grade> exportExperimentGrade(User user);

    User checkUsername(User user);

    Integer addQuestion(Question question);

    Integer addAnswer(Answer answer);

    Integer deleteAnswer(@Param("answerId") Integer answerId,@Param("roleId") Integer roleId,@Param("id") Integer id);

    Integer deleteQuestion(@Param("questionId") Integer questionId);

    void deleteALLAnswer(@Param("questionId") Integer questionId);

    List<Question> getQuestion(@Param("username") String username, @Param("school") String school,@Param("question") String question);

    List<Answer> getAnswer(@Param("questionId") Integer questionId);

    List<WeiBo> getWeiboSourceData();

    List<WeChat> getWeChatSourceData();

    List<News> getNewsSourceData();

    List<Recruitment> getRecruitmentSourceData();

    List<Patent> getPatentSourceData();

    List<CompanyWebsite> getCompanyWebsiteSourceData();

    List<CommunityForum> getCommunityForumSourceData();

    List<CorporateAnnualReports> getCorporateAnnualSourceData();

    List<BusinessInformation> getBusinessInformationSourceData();
}
